define(function () {
    // 带看回访
    var lookVisit = {
        name: 'look-visit',
        template:
        '<div class="owner-li1">' +
        '    <p>' +
        '        <span>' +
        '            <em>回访人：</em>{{dataObj.visitingPerson}}</span>' +
        '        <span>' +
        '            <em>回访时间：</em>{{dataObj.revisitDays}}</span></p>' +
        '    <p>' +
        '        <span>' +
        '            <em>带看客户：</em>{{dataObj.returnVisitType}}</span></p>' +
        '    <p>{{dataObj.contentText}}</p>' +
        '    <p>' +
        '        <img v-for="item in dataObj.imgList" :src="item">' +
        '        <strong :class="seeStatusStyle">{{seeStatus}}</strong>' +
        '        <strong :class="intentionStyle">{{intentionState}}</strong></p>' +
        '</div>',
        props: {
            dataObj: {
                type: Object,
                default: function () {
                    return {}
                }
            }
        },
        computed: {
            seeStatus: function () {
                var releaseMsg = ''
                switch (this.dataObj.seeStatus) {
                    case 0: {
                        this.seeStatusStyle.not = true
                        releaseMsg = '已带看'
                        break
                    }
                    case 1: {
                        this.seeStatusStyle.alreadyA = true
                        releaseMsg = '未带看'
                        break
                    }
                }
                return releaseMsg
            },
            intentionState: function () {
                var releaseMsg = ''
                switch (this.dataObj.intentionState) {
                    case 0: {
                        this.intentionStyle.alreadyA = true
                        releaseMsg = '意向强烈'
                        break
                    }
                    case 1: {
                        this.intentionStyle.intention = true
                        releaseMsg = '意向一般'
                        break
                    }
                    case 2: {
                        this.intentionStyle.weak = true
                        releaseMsg = '意向较弱'
                        break
                    }
                }
                return releaseMsg
            }
        },
        data: function () {
            return {
                seeStatusStyle: {
                    'not': false,
                    'alreadyA': false
                },
                intentionStyle: {
                    'alreadyA': false,
                    'intention': false,
                    'weak': false
                }
            }
        }
    }
    return lookVisit
})
